
# 返回中文术语和图片id
def trm_result(arr):
    import numpy as np
    CLASSES = [
    {'abbr':'akiec', 'chinese': '日光性角化症或上皮内癌','english':'Actinic keratoses and intraepithelial carcinoma'},
    {'abbr':'bcc', 'chinese': '基底细胞癌',            'english' : ' basal cell carcinoma'},           
    {'abbr':'bkl', 'chinese': '良性角化病',           'english' : 'benign keratosis-like lesions'},
    {'abbr':'df', 'chinese': '皮肤纤维瘤',           'english' : 'dermatofibroma'},
    {'abbr':'mel', 'chinese': '黑色素瘤',             'english' : 'melanoma'},
    {'abbr':'nv', 'chinese': '黑色素细胞痣',         'english' : 'melanocytic nevi'},
    {'abbr':'vasc', 'chinese': '血管性皮肤病变',       'english' : 'vascular lesions '},
    ]
    cse_id = np.argmax(arr)
    abbreviation = CLASSES[cse_id]['abbr']
    chinese_trm = CLASSES[cse_id]['chinese']
    english_trm = CLASSES[cse_id]['english']
    result_value = [cse_id, abbreviation, chinese_trm, english_trm]
    return result_value

def process_arr(arr):
    result_value = trm_result(arr)
    result_key = ['Bingli_id', 'SuoXie', 'chinese', 'english']
    result_d = {} # 建立字典
    for index in range(len(result_key)):
        result_d[result_key[index]] = result_value[index]
    print(result_d)
    return result_d